package top.kangyaocoding.ltzf.factory;

import lombok.Getter;
import lombok.Setter;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;

/**
 * @Author K·Herbert
 * @Description 工厂配置信息
 * @Date 2024-05-14 17:05
 */

@Getter
public class Configuration {
    // 接口地址
    @Setter
    private String apiUrl = "https://api.ltzf.cn/";
    // 开发者ID
    private final String appId;
    // 商户ID
    private final String merchantId;
    // 商户密钥
    private final String partnerKey;
    // 回调地址
    private final String notifyUrl;

    public Configuration(String appId, String merchantId, String partnerKey, String notifyUrl) {
        this.appId = appId;
        this.merchantId = merchantId;
        this.partnerKey = partnerKey;
        this.notifyUrl = notifyUrl;
    }

    @Setter
    private OkHttpClient okHttpClient;
    @Setter
    private HttpLoggingInterceptor.Level logLevel = HttpLoggingInterceptor.Level.BODY;
    @Setter
    private long connectTimeout = 60;
    @Setter
    private long readTimeout = 30;
    @Setter
    private long writeTimeout = 30;
}
